From: Marco Trevisan (TreviƱo) Date: Fri, 12 Apr 2019 20:46:10 +0000 (-0500) Subject: popupMenu: Implement vfunc's for key focus in/out X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~208 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bdf66d7b62b383045ddbc039138c542224670895;p=gnome-shell.git popupMenu: Implement vfunc's for key focus in/out As per the fact the menu item is an object we can just vfunc's. This is not possible for events as specific union object is passed instead of just the Clutter.Event. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 8cb0650d7..d068394e2 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -95,9 +95,6 @@ var PopupBaseMenuItem = GObject.registerClass({ } if (params.reactive && params.hover) this.connect('notify::hover', this._onHoverChanged.bind(this)); - - this.connect('key-focus-in', this._onKeyFocusIn.bind(this)); - this.connect('key-focus-out', this._onKeyFocusOut.bind(this)); } get actor() { @@ -161,11 +158,13 @@ var PopupBaseMenuItem = GObject.registerClass({ return Clutter.EVENT_PROPAGATE; } - _onKeyFocusIn(actor) { + vfunc_key_focus_in() { + super.vfunc_key_focus_in(); this.setActive(true); } - _onKeyFocusOut(actor) { + vfunc_key_focus_out() { + super.vfunc_key_focus_out(); this.setActive(false); }